home *** CD-ROM | disk | FTP | other *** search
- /*************************************************
- CDigitalControl.h
-
- Interface for the DigitalControl Class
-
- © 1989 Enrico Colombini. All rights reserved.
- *************************************************/
- #define _H_CDigitalControl /*include only once*/
-
- #include <CPane.h>
- #include <CButton.h>
- #include <CBorder.h>
- #include <CStaticText.h>
-
- /*** class declaration: ***/
-
- struct CDigitalControl : CPane {
-
- /* instance variables: */
-
- CButton *dnBtn; /*down/up buttons*/
- CButton *upBtn;
- Rect grayRect; /*rect between buttons*/
- CBorder *border; /*border around display*/
- CStaticText *disp; /*digital display*/
- short value; /*current value*/
- short minValue; /*allowed limits*/
- short maxValue;
- short stepSlow; /*sigle & lowspeed rate*/
- short stepFast; /*high-speed step rate*/
- short threshold; /*steps to rate change*/
- short firstDelay; /*delay after 1st step*/
- short reptDelay; /*after following steps*/
- long lastDown; /*last mouse dn event*/
- long nextWhen; /*time for next step*/
- short trackSpeed; /*1=single,2=slow,3=fast*/
- short trackCount; /*steps from spd change*/
- long displayCmd; /*issue before display*/
-
- /* overridden methods: */
-
- void Draw(Rect *area); /*draw object*/
-
- /* new methods: */
-
- void IDigitalControl( /*init object*/
- short resID,
- CView *anEnclosure,
- CBureaucrat *aSupervisor);
- void TrackValue(CView *btn); /*internal use*/
- void SetValue(short val); /*set value*/
- void SetDisplayText(char *txt); /*displ. text*/
- void UpdateDisplayNow(void); /*update displ.*/
- void SetMinValue(short val); /*set low limit*/
- void SetMaxValue(short val); /*set hi limit*/
- void SetSteps( /*step rates*/
- short slow,short fast,
- short thr);
- void SetDisplayCmd(long cmd); /*set command*/
- short GetValue(void); /*return value*/
- };
-
-